package com.orhon.smartcampus.modules.systemctl.mm;


import java.util.List;

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import com.orhon.smartcampus.modules.base.mm.DictionaryMapper;
import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.systemctl.entity.OperationApi;
import com.orhon.smartcampus.modules.systemctl.gqlModel.GQLOperationApi;
import com.orhon.smartcampus.modules.user.mm.UserMapper;


@Mapper(uses = {
        DictionaryMapper.class,
        LangMapper.class,
        UserMapper.class,
        
})
public interface OperationApiMapper {

    OperationApiMapper MAPPER = Mappers.getMapper(OperationApiMapper.class);

    @Mapping(source = "id" , target = "id")
    @Mapping(source = "api_id" , target = "api_id")
    @Mapping(source = "api_code" , target = "api_code")
    @Mapping(source = "operation_id" , target = "operation_id")
    GQLOperationApi toOperationApi(OperationApi entity);
    
    @InheritConfiguration(name = "toOperationApi")
    List<GQLOperationApi> toOrgDutiesList(List<OperationApi> entities);

}
